<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('offering')} > ${i18n.getMessage('student')}">
	<a href="#" onclick="cc('study/showChangeOffering.sgt?offeringId=${offering.id}')">${i18n.getMessage('moveStudents')}</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${offering.id}')">${i18n.getMessage('offering')}</a>
</@showTitle>
<br/>

<table width="100%">
<tr>
<td valign="top" width="50%">

<@display.table id="listTable" name="offeringMembers" style="width: 100%">
	<@display.column title="${i18n.getMessage('ordinalNumber')}" style="text-align:center">${listTable_rowNum}</@display.column>
	<@display.column title="${i18n.getMessage('lastName')}"><#if (listTable.active)>${(listTable.receipt.student.lastName)!}<#else><span style="text-decoration: line-through">${(listTable.receipt.student.lastName)!}</span></#if></@display.column>
	<@display.column title="${i18n.getMessage('firstName')}">
			<#if (listTable.active)>
				<#if listTable.consecutive>
					<span style="background-color:yellow">${(listTable.receipt.student.firstName)!}</span>
				<#else>
					${(listTable.receipt.student.firstName)!}
				</#if>
			<#else>
				<#if listTable.consecutive>
					<span style="background-color:yellow;text-decoration: line-through">${(listTable.receipt.student.firstName)!}</span>
				<#else>
					<span style="text-decoration:line-through">${(listTable.receipt.student.firstName)!}</span>
				</#if>
			</#if>
	</@display.column>
	<@display.column title="${i18n.getMessage('receipt')}" style="text-align:center"><img src="images/edit.gif" onclick="loadata('details', 'study/showEditReceipt.sgt?id=${(listTable.receipt.id)!}')" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('info')}" style="text-align:center"><img src="images/info.gif" onclick="loadata('details', 'study/showEditOfferingMember.sgt?id=${(listTable.id)!}')" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('history')}" style="text-align:center"><img src="images/019.gif" onclick="loadata('details', 'student/showSummaryHistoryStudent.sgt?id=${(listTable.receipt.student.id)!}')" style="cursor:pointer"/></@display.column>
</@display.table>
</td>

<td valign="top" width="50%">
	<div id="details"></div>
</td>

</table>
<br/>

<script>
	<#if receiptId??>
		loadata('details', 'study/showEditReceipt.sgt?id=${receiptId}');
	<#else>
		<#if id??>
			loadata('details', 'study/showEditOfferingMember.sgt?offeringId=${offering.id}&id=${id}');
		<#elseif (offering.offeringReceipts.size() > 0)>
			loadata('details', 'study/showEditReceipt.sgt?id=${(offering.offeringReceipts.iterator().next().id)!}');
		</#if>
	</#if>
	$('error').hide();
</script>